package co.yixiang.modules.shop.service;

import co.yixiang.modules.shop.domain.YxSalesCommission;
import co.yixiang.modules.shop.service.dto.YxSalesCommissionDto;
import co.yixiang.modules.shop.service.dto.YxSalesCommissionQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @author frq
* @date 2020-06-11
*/
public interface YxSalesCommissionService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(YxSalesCommissionQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<YxSalesCommissionDto>
    */
    List<YxSalesCommissionDto> queryAll(YxSalesCommissionQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return YxSalesCommissionDto
     */
    YxSalesCommissionDto findById(Integer id);

    /**
     * 创建
     * @param resources /
     * @return YxSalesCommissionDto
     */
    YxSalesCommissionDto create(YxSalesCommission resources);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<YxSalesCommissionDto> all, HttpServletResponse response) throws IOException;

    /**
     * 查询月份
     * @return
     */
    List<String> findMonth();
}